#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
int main()
{
    string tmp;
    double ans = 0, rating = 1, total = 0, rat = 1;
    cin >> tmp;
    double length = tmp.size();
    if ((tmp[tmp.size() - 1] - '0') % 2 == 0)
    {
        rat += 1.0;
    }
    for (size_t i = 0;i < tmp.size();i++)
    {
        if (i == 0 && tmp[i] == '-')
        {
            rating += 0.5;
            length -= 1.0;
            continue;
        }
        if (tmp[i] - '0' == 2)
        {
            total += 1.0;
        }
    }
    ans = (total / length) * (rating * rat) * 100.0;
    printf("%.2lf%\n", ans);
    return 0;
}
